home *** CD-ROM | disk | FTP | other *** search
Wrap
ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) NNNNAAAAMMMMEEEE GLResources - X resources used by GL programs DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN In IRIX 4.0 and later, the GL responds to several X resources, allowing run-time control over some aspects of GL programs. This man page assumes you are somewhat familiar with X resources, if you are not, you should read some X documentation such as Volume 3 of the O'Reily X books. The GL uses resources names with the prefixes appname.gl. (instance prefix) Appname.GL. (class prefix) where appname and Appname are derived from the argument to the GL program's first call to winopen(3G) upper case. appname may not exactly match the first argument to winopen, because appname must follow the rules for legal resource names. The following processing is done on all winopen names to turn them into resource names: In the instance name (appname), the first character, if it is a letter, is changed to be in lower case. In the class name (Appname), the first character, if it is a letter, is changed to be in upper case. All spaces are removed, alphabetic characters following space are changed to upper case. All characters except 0-9, A-Z, "-" (dash) and "_" (underscore) are stripped. For example, if the first call to winopen of a gl program was winopen("clock view #123"); All the resources instance names for the program would be prefixed with _cccc_llll_oooo_cccc_kkkk_VVVV_iiii_eeee_wwww_1111_2222_3333_...._gggg_llll_.... and class names with _CCCC_llll_oooo_cccc_kkkk_VVVV_iiii_eeee_wwww_1111_2222_3333_...._GGGG_LLLL_.... WWWWIIIINNNNDDDDOOOOWWWW SSSSPPPPEEEECCCCIIIIFFFFIIIICCCC RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS The following resources affect only windows whose full resource names match resource specification. That is, it is possible to specify these resources in such a way that only some of the windows of a GL program are affected by these resources. All of theses resources are fully specified by the names listed here, preceded by the _w_i_n_d_o_w _r_e_s_o_u_r_c_e _p_a_t_h _n_a_m_e of the window. That is the application prefix mentioned above, followed by ._w_i_n_N_a_m_e in the instance string and _...._GGGG_LLLL_WWWW_iiii_nnnn_dddd_oooo_wwww in the class name. That is, if the above "clock view" program were to open another window with the call winopen("second one"); PPPPaaaaggggeeee 1111 ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) the _w_i_n_N_a_m_e would be _ssss_eeee_cccc_oooo_nnnn_dddd_OOOO_nnnn_eeee, and its window specific resources would all by fully specified by preceding the names with _cccc_llll_oooo_cccc_kkkk_VVVV_iiii_eeee_wwww_1111_2222_3333_...._gggg_llll_...._ssss_eeee_cccc_oooo_nnnn_dddd_OOOO_nnnn_eeee_.... and _CCCC_llll_oooo_cccc_kkkk_VVVV_iiii_eeee_wwww_1111_2222_3333_...._GGGG_LLLL_...._GGGG_LLLL_WWWW_iiii_nnnn_dddd_oooo_wwww_.... Here are the window specific resources. Each resource has two names, a class name and an instance name. In most cases the class name is the same as the instance name except for case. ggggeeeeoooommmmeeeettttrrrryyyy GGGGeeeeoooommmmeeeettttrrrryyyy Specifies an initial size and/or position for the window. The syntax and interpretation of the ggggeeeeoooommmmeeeettttrrrryyyy resource is the same as for X window: _w_i_d_t_hxxxx_h_e_i_g_h_t[++++----]_x_p_o_s[++++----]_y_p_o_s. For all the resources controlling size and position, values in the resource file override program specified position (through pppprrrreeeeffffppppoooossssiiiittttiiiioooonnnn(3G)), but not program specified placement (through wwwwiiiinnnnppppoooossssiiiittttiiiioooonnnn(3G)). ppppoooossssiiiittttiiiioooonnnn PPPPoooossssiiiittttiiiioooonnnn Specifies initial size and position of the window, the coordinate system is 0,0 at the lower left hand corner of the screen. Syntax is: _x_p_o_s _y_p_o_s [ _u_n_i_t_s ] _w_i_d_t_h _h_e_i_g_h_t [ _u_n_i_t_s ] . The _u_n_i_t_s are optional and are one of ppppiiiixxxxeeeellllssss,,,, iiiinnnncccchhhheeeessss or mmmmmmmm.... If no units are specified, the numbers are assumed to be in pixels. ssssiiiizzzzeeee SSSSiiiizzzzeeee Specifies initial size only. Syntax is: _w_i_d_t_h _h_e_i_g_h_t [ _u_n_i_t_s ] oooorrrriiiiggggiiiinnnn OOOOrrrriiiiggggiiiinnnn Specifies initial lower left origin only. If program doesn't call pppprrrreeeeffffssssiiiizzzzeeee(3G), or if another resource doesn't specify a size, this resource has no effect. Syntax is: _x_p_o_s _y_p_o_s [ _u_n_i_t_s ] ppppooooiiiinnnntttteeeerrrrSSSShhhhaaaappppeeee CCCCuuuurrrrssssoooorrrr Sets the default cursor for that window to the X font cursor shape with the given name. This is the cursor which the window will show when GL cursor number 0 is active. Syntax: _c_u_r_s_o_r _n_a_m_e ppppooooiiiinnnntttteeeerrrrCCCCoooolllloooorrrr FFFFoooorrrreeeeggggrrrroooouuuunnnndddd Sets the foreground color of the default gl cursor. Syntax: _c_o_l_o_r_n_a_m_e | #_R_R_G_G_B_B ppppooooiiiinnnntttteeeerrrrCCCCoooolllloooorrrrBBBBaaaacccckkkkggggrrrroooouuuunnnndddd BBBBaaaacccckkkkggggrrrroooouuuunnnndddd Sets the background color of the default gl cursor. Syntax: _c_o_l_o_r_n_a_m_e | #_R_R_G_G_B_B PPPPaaaaggggeeee 2222 ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) MMMMEEEENNNNUUUU RRRREEEELLLLAAAATTTTEEEEDDDD RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS These resources control the behavior and appearance of the popup menus displayed by defpup(3G). Some IRIX 4.0 programs use menus that look the same, but aren't controlled by exactly the same resources. Two examples of programs with similar-looking, but non-GL, menus would be workspace(1) and wsh(1). mmmmeeeennnnuuuu....oooovvvveeeerrrrFFFFiiiirrrrsssstttt MMMMeeeennnnuuuu....OOOOvvvveeeerrrrFFFFiiiirrrrsssstttt If this resource is specified and is set to "True" then when the popop menu is first drawn, it will be placed so that the first menu item is automatically selected. Syntax: FFFFaaaallllsssseeee | TTTTrrrruuuueeee mmmmeeeennnnuuuu....ddddaaaarrrrkkkkCCCCoooolllloooorrrr MMMMeeeennnnuuuu....FFFFoooorrrreeeeggggrrrroooouuuunnnndddd mmmmeeeennnnuuuu....mmmmeeeeddddiiiiuuuummmmCCCCoooolllloooorrrr MMMMeeeennnnuuuu....BBBBaaaacccckkkkggggrrrroooouuuunnnndddd mmmmeeeennnnuuuu....lllliiiigggghhhhttttCCCCoooolllloooorrrr MMMMeeeennnnuuuu....BBBBaaaacccckkkkggggrrrroooouuuunnnndddd The menus are drawn in the overlay planes by using dither patterns made from three colors: dark, medium, and light. Syntax: _c_o_l_o_r_n_a_m_e | #_R_R_G_G_B_B mmmmeeeennnnuuuu....ffffoooonnnntttt MMMMeeeennnnuuuu....FFFFoooonnnntttt This is the font used for the body of the menus. Syntax: _x_f_o_n_t_n_a_m_e mmmmeeeennnnuuuuTTTTiiiittttlllleeee....ffffoooonnnntttt MMMMeeeennnnuuuuTTTTiiiittttlllleeee....FFFFoooonnnntttt This is the font used for the title of the menus. Syntax: _x_f_o_n_t_n_a_m_e CCCCOOOOMMMMPPPPAAAATTTTIIIIBBBBIIIILLLLIIIITTTTYYYY RRRREEEELLLLAAAATTTTEEEEDDDD RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS There are a few areas where the GL behaves in an incompatible way in IRIX 4.0. In order to enable compatible behavior for programs that can't be re-compiled, there are the following resources. ggggllllCCCCoooommmmppppaaaatttt....ssssooooffffttttAAAAttttttttaaaacccchhhh GGGGLLLLCCCCoooommmmppppaaaatttt....SSSSooooffffttttAAAAttttttttaaaacccchhhh Under previous window systems, if any keyboard key were held down, a window would keep receiving mouse events, even if the mouse moved out of the window. This type of input distribution is not supported as a generally available focus policy in X, so the GL can provide a similar behavior from programs that ask for it. If a program calls glcompat(GLC_SOFTATTACH, TRUE); or if it has the ssssooooffffttttAAAAttttttttaaaacccchhhh resource set to true, then holding down any of the modifier keys (other than _a_l_t) locks the mouse focus onto that window until all modifier keys (other than _a_l_t) PPPPaaaaggggeeee 3333 ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) are released. (Modifier keys other than _a_l_t are _s_h_i_f_t and _c_o_n_t_r_o_l.) Syntax: _T_r_u_e | _F_a_l_s_e ggggllllCCCCoooommmmppppaaaatttt....mmmmoooottttiiiioooonnnnQQQQGGGGrrrroooowwwwtttthhhhRRRRaaaatttteeee GGGGLLLLCCCCoooommmmppppaaaatttt....MMMMoooottttiiiioooonnnnQQQQGGGGrrrroooowwwwtttthhhhRRRRaaaatttteeee Prior to release 4.0 there was an artificial throttle on the number of mouse events per second that would be delivered to a program. This was set at around 15 events per second. In IRIX 4.0 programs can receive over 100 mouse events per second. Programs that do a lot of processing on each mouse event can suddenly find themselves doing 10 times more work. This resource enables varying levels of compression of mouse motion. Syntax: _c_o_m_p_a_t | _c_o_m_p_r_e_s_s, where _c_o_m_p_a_t produces a rate similar to pre 4.0, and _c_o_m_p_r_e_s_s gives maximum compression of motion events. Note: when this resource is used to cause libgl to compress motion events, the most recent motion event is never thrown away. Rather, if a new event arrives at a rate faster than allowed by the value of this resource, the new event overwrites the former most recent event. That is, using compression does not in any way prohibit a program from keeping up with the device. This functionality may be accessed from a C program by calling glcompat(GLC_MQUEUERATE, GLC_COMPATRATE); or glcompat(GLC_MQUEUERATE, GLC_CMPRESS); ggggllllCCCCoooommmmppppaaaatttt....mmmmaaaannnnaaaaggggeeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd GGGGLLLLCCCCoooommmmppppaaaatttt....MMMMaaaannnnaaaaggggeeeeBBBBaaaacccckkkkggggrrrroooouuuunnnndddd If set to TTTTrrrruuuueeee, imakebackround(3G) windows will be managed by the window manager. The correct setting of this will vary based on type of background program and type of machine and the user's selection of window managers. See imakebackground(3G) for more information. Syntax: _T_r_u_e | _F_a_l_s_e ggggllllCCCCoooommmmppppaaaatttt....sssslllloooowwwwMMMMaaaappppccccoooolllloooorrrrssss GGGGLLLLCCCCoooommmmppppaaaatttt....SSSSlllloooowwwwMMMMaaaappppccccoooolllloooorrrrssss If set to true, then the default behavior of mapcolor buffering will be disabled. See mapcolor(3G) for more details. Syntax: _T_r_u_e | _F_a_l_s_e ggggllllCCCCoooommmmppppaaaatttt....iiiinnnnppppuuuuttttCCCChhhhaaaannnnggggeeeeBBBBuuuugggg GGGGLLLLCCCCoooommmmppppaaaatttt....IIIInnnnppppuuuuttttCCCChhhhaaaannnnggggeeeeBBBBuuuugggg If set to TTTTrrrruuuueeee, the pseudo device INPUTCHANGE retains a bug compatible behavior relating to subwindows. See glcompat(3G) for more information. Syntax: _T_r_u_e | _F_a_l_s_e ggggllllCCCCoooommmmppppaaaatttt....nnnnooooBBBBoooorrrrddddeeeerrrrBBBBuuuugggg PPPPaaaaggggeeee 4444 ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) GGGGLLLLCCCCoooommmmppppaaaatttt....NNNNooooBBBBoooorrrrddddeeeerrrrBBBBuuuugggg If set to TTTTrrrruuuueeee, then windows which remove their borders with winconstraints(3G) can never get them back. See glcompat(3G) for more information. Syntax: _T_r_u_e | _F_a_l_s_e ggggllllCCCCoooommmmppppaaaatttt....ffffoooorrrrcccceeeeCCCCIIIIMMMMaaaapppp GGGGLLLLCCCCoooommmmppppaaaatttt....FFFFoooorrrrcccceeeeCCCCIIIIMMMMaaaapppp If set to TTTTrrrruuuueeee, then the color index colormap will also be installed when an RGB window receives colormap focus. Syntax: _T_r_u_e | _F_a_l_s_e ggggllllCCCCoooommmmppppaaaatttt....ttttaaaabbbblllleeeettttSSSSccccaaaalllleeee GGGGLLLLCCCCoooommmmppppaaaatttt....TTTTaaaabbbblllleeeettttSSSSccccaaaalllleeee determines how tablet coordinates are scaled when the tablet controls the pointer (graphics cursor). If the value is _0, there is a 1-1 mapping between tablet coordinates and screen coordinates, so that on a typical tablet, only the lower left quadrant will be mapped to the screen. If the value is _1 (the default), then "iso" scaling is performed. That is, as much of the tablet as possible is mapped to the screen, with the restriction that a 1-1 aspect ratio is preserved. (I.e. the same scaling is applied to both x and y.) If the value is _2, then the entire tablet is mapped to the entire screen. (This is called "fit" scaling.) OOOOTTTTHHHHEEEERRRR MMMMIIIISSSSCCCCEEEELLLLLLLLAAAANNNNEEEEOOOOUUUUSSSS RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS aaaauuuuttttooooFFFFoooorrrrkkkk AAAAuuuuttttooooFFFFoooorrrrkkkk If aaaauuuuttttooooFFFFoooorrrrkkkk is set to FFFFaaaallllsssseeee, or if foreground(3G) is called, then the GL will not fork when it firsts calls winopen. Syntax: _T_r_u_e | _F_a_l_s_e sssseeeettttvvvvaaaallllCCCCoooonnnnssssttttrrrraaaaiiiinnnnssss SSSSeeeettttvvvvaaaallllCCCCoooonnnnssssttttrrrraaaaiiiinnnnssss When setvaluator(3G) is used for a device such as MOUSEX which controls the cursor, the _v_m_i_n and _v_m_a_x arguments can cause the cursor to be constrained to a rectangle which is less than the full screen. If sssseeeettttvvvvaaaallllCCCCoooonnnnssssttttrrrraaaaiiiinnnnssss is set to FFFFaaaallllsssseeee, then setvaluator(3G) will not constrain the cursor. The default is TTTTrrrruuuueeee. Syntax: _T_r_u_e | _F_a_l_s_e SSSSOOOOUUUURRRRCCCCEEEESSSS OOOOFFFF RRRREEEESSSSOOOOUUUURRRRCCCCEEEESSSS The GL mimics Xt's resource search rules, and looks for resources in the following places: $XFILESEARCHPATH/_A_p_p_n_a_m_e or /usr/lib/X11/app-defaults/_A_p_p_n_a_m_e PPPPaaaaggggeeee 5555 ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) $XUSERFILESEARCHPATH/_A_p_p_n_a_m_e or $XAPPLRESDIR/_A_p_p_n_a_m_e or $HOME/_A_p_p_n_a_m_e Server resource database or $HOME/Xdefaults $XENVIRONMENT or.Xdefaults-_h_o_s_t_n_a_m_e Contents of the environment variable GLRES EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS The following program and resource file show some examples of how these resources can be used to customize the behavior of a GL program. /* Begin C Program */ #include <gl.h> #include <device.h> main() { int m; winopen("res test"); color(0); clear(); wintitle("Resource Test -- First Window"); winopen("2nd window"); color(0); clear(); qdevice(RIGHTMOUSE); m = defpup("Main Menu%t|One|Two|Three"); for (;;) { short val; switch (qread(&val)) { case REDRAW: winset(val); reshapeviewport(); color(0); clear(); break; case RIGHTMOUSE: if (val) dopup(m); break; } } } /* End C Program */ ! ! Begin Resource file, put this in $HOME/ResTest ! ! Give these windows an interesting cursor resTest*pointerShape: gumby ! ! Make all fonts for this program's menus be large resTest*Font: -*-times-*-r-*-*-34-*-*-*-*-170-*-* PPPPaaaaggggeeee 6666 ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ggggllllrrrreeeessssoooouuuurrrrcccceeeessss((((3333GGGG)))) ! ! Make the first window appear in the lower left corner, ! and be 1 inch square resTest.gl.resTest.position: 0 0 pixels 1 1 inches ! ! Make the second window appear in the upper right corner resTest.gl.2ndWindow.geometry: 300x300-50+50 ! ! Keep the program from backgrounding itself resTest.gl.autoFork: False ! ! Note that wildcarding can be used in resource names. ! For example, the entry for autoFork could have been written ! "*gl*autoFork: False" or "*gl.autoFork: False". SSSSEEEEEEEE AAAALLLLSSSSOOOO glcompat(3G), xrdb(1), Xlib Resource Manager documentation, foreground(3G), imakebackground(3G), winopen(3G) PPPPaaaaggggeeee 7777